<?php

namespace common\models\db\tables;

use Yii;

/**
 * This is the model class for table "{{%log_platform_capital_operation}}".
 *
 * @property int $id
 * @property string $type 操作类型
 * @property string $plat_no 平台编号
 * @property string $trans_id 请求业务流水号
 * @property float $trans_amount 交易金额
 * @property string|null $acct_type 04-营销费用分户(只支持营销分户转出到会员账户)
 * @property string|null $plat_cust_no 客户编号
 * @property string|null $out_acct_type 转出分户类型（01-普通资金分户、02-交易手续费分户、03-提现手续费分户、04-营销费用分户、05-转账验证子账户)
 * @property string|null $in_acct_type 转入账户类型(01-普通资金分户、02-交易手续费分户、03-提现手续费分户、04-营销费用分户、05-转账验证子账户)
 * @property string|null $remark 备注
 * @property int $created_at
 * @property int $updated_at
 * @property int|null $deleted_at
 * @property int|null $created_by
 * @property int|null $updated_by
 * @property int $status
 * @property string|null $resp_cont
 * @property string|null $ret_code
 * @property string|null $ret_msg
 */
class LogPlatformCapitalOperation extends \yii\db\ActiveRecord
{
    /**
     * {@inheritdoc}
     */
    public static function tableName()
    {
        return '{{%log_platform_capital_operation}}';
    }

    /**
     * {@inheritdoc}
     */
    public function rules()
    {
        return [
            [['type', 'plat_no', 'trans_id', 'trans_amount', 'acct_type', 'plat_cust_no', 'out_acct_type', 'in_acct_type', 'remark', 'created_at', 'updated_at', 'deleted_at', 'created_by', 'updated_by', 'status', 'resp_cont', 'ret_code', 'ret_msg'], 'trim'],
            [['type', 'plat_no', 'trans_id', 'trans_amount', 'created_at', 'updated_at'], 'required'],
            [['trans_amount'], 'number'],
            [['remark', 'resp_cont'], 'string'],
            [['created_at', 'updated_at', 'deleted_at', 'created_by', 'updated_by', 'status'], 'integer'],
            [['type'], 'string', 'max' => 10],
            [['plat_no', 'trans_id', 'plat_cust_no'], 'string', 'max' => 50],
            [['acct_type', 'out_acct_type', 'in_acct_type'], 'string', 'max' => 2],
            [['ret_code'], 'string', 'max' => 20],
            [['ret_msg'], 'string', 'max' => 100],
            [['acct_type', 'plat_cust_no', 'out_acct_type', 'in_acct_type', 'remark', 'deleted_at', 'created_by', 'updated_by', 'resp_cont', 'ret_code', 'ret_msg'], 'default', 'value' => null],
            [['status'], 'default', 'value' => 10],
        ];
    }

    /**
     * {@inheritdoc}
     */
    public function attributeLabels()
    {
        return [
            'id' => Yii::t('app', 'ID'),
            'type' => Yii::t('app', '操作类型'),
            'plat_no' => Yii::t('app', '平台编号'),
            'trans_id' => Yii::t('app', '请求业务流水号'),
            'trans_amount' => Yii::t('app', '交易金额'),
            'acct_type' => Yii::t('app', '04-营销费用分户(只支持营销分户转出到会员账户)'),
            'plat_cust_no' => Yii::t('app', '客户编号'),
            'out_acct_type' => Yii::t('app', '转出分户类型（01-普通资金分户、02-交易手续费分户、03-提现手续费分户、04-营销费用分户、05-转账验证子账户)'),
            'in_acct_type' => Yii::t('app', '转入账户类型(01-普通资金分户、02-交易手续费分户、03-提现手续费分户、04-营销费用分户、05-转账验证子账户)'),
            'remark' => Yii::t('app', '备注'),
            'created_at' => Yii::t('app', 'Created At'),
            'updated_at' => Yii::t('app', 'Updated At'),
            'deleted_at' => Yii::t('app', 'Deleted At'),
            'created_by' => Yii::t('app', 'Created By'),
            'updated_by' => Yii::t('app', 'Updated By'),
            'status' => Yii::t('app', 'Status'),
            'resp_cont' => Yii::t('app', 'Resp Cont'),
            'ret_code' => Yii::t('app', 'Ret Code'),
            'ret_msg' => Yii::t('app', 'Ret Msg'),
        ];
    }
}
